<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>

<body>
<?php
include_once("conn.php");
$cname=$_REQUEST['cname'];
$sql = "SELECT * FROM course WHERE `name` = '$cname'";
$result=mysql_query($sql);

$row = mysql_fetch_row($result);
$cid=$row[0];

$sql = "SELECT * FROM student WHERE `id` NOT IN (SELECT `sid` FROM xuanke)";
$result=mysql_query($sql);
while($row = mysql_fetch_row($result)){
?>
	<table border="1" bordercolor="#ffffff" style="BORDER-COLLAPSE: collapse; color: #FFF"; width="50%" bgcolor="#6589d1" class="h">
  <tr style="text-align: center">
    <td width="21%">学号</td>
    <td width="79%"><?=$row[0]?></td>
  </tr>
  <tr style="text-align: center">
    <td>姓名</td>
    <td><?=$row[1]?></td>
  </tr>
  <tr style="text-align: center">
    <td>性别</td>
    <td><?=$row[3]==0?"男":"女"?></td>
  </tr>
  <tr style="text-align: center">
    <td>学院</td>
    <td><?=$row[4]?></td>
  </tr>
  <tr style="text-align: center">
    <td>专业</td>
    <td><?=$row[5]?></td>
  </tr>
  <tr style="text-align: center">
    <td>出生年月</td>
    <td><?=$row[6].".".$row[7]?></td>
  </tr>
  <tr style="text-align: center">
    <td bgcolor="#FFFFFF">&nbsp;</td>
    <td bgcolor="#FFFFFF">&nbsp;</td>
  </tr>
  </table>
<?php
}
mysql_close($conn);
?>
</body>
</html>